<?php
require_once('./Base.php');
$base = new Base();
$db = $base->getDB();

@$token = $_GET["token"];
if (empty($base->checkToken($token))) {
  exit($base->getResJson(false, null, USER_UNAUTHORIZED_ERROR, '未授权用户'));
}

$id = $_GET['id'];
$table = $_GET['table'];

$sql = "delete from $table where id=$id";
$db->rawQuery($sql);

$res = array(
  "success" => true,
  "message" => "数据删除成功",
  "errCode" => 0,
  "data" => null
);

echo $base->getResJson(true, null, 0, '接口数据请求成功', $res);
